import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from "react";
import { PureComponent } from "react";
import CpasTable from "../ExcelGrid";
import "./_style.less";
class HandsonTableFs extends PureComponent {
    //gridService: GridService; //表格增删改查服务
    cpasHandSonFs = React.createRef(); //容器Ref
    handsonTableFs = React.createRef();
    constructor(props) {
        super(props);
        console.log("props--", props);
        this.state = {
            tableTitle: props.tableTitle,
            tableLfDesc: props.tableLfDesc,
            tableRiDesc: props.tableRiDesc,
            tableDate: props.tableDate,
        };
    }
    componentWillReceiveProps(nextProps) {
        this.setState({
            tableTitle: nextProps.tableTitle,
            tableLfDesc: nextProps.tableLfDesc,
            tableRiDesc: nextProps.tableRiDesc,
            tableDate: nextProps.tableDate,
        });
    }
    //导入excel，更新表头数据
    updateTableDescData(data) {
        this.setState({
            tableTitle: data.tableTitle,
            tableLfDesc: data.tableLfDesc,
            tableRiDesc: data.tableRiDesc,
            tableDate: data.tableDate,
        });
    }
    render() {
        const { tableTitle, tableLfDesc, tableRiDesc, tableDate } = this.state;
        return (_jsxs("div", { className: "cpas-tablefs-content", ref: this.cpasHandSonFs, children: [_jsxs("div", { className: "cpas-tablefs-top", children: [_jsx("div", { className: "cpas-table-title", children: tableTitle }), _jsx("div", { className: "cpas-table-date", children: tableDate }), _jsxs("div", { className: "cpas-table-box", children: [_jsx("div", { className: "cpas-lf-desc", children: tableLfDesc }), _jsx("div", { className: "cpas-ri-desc", children: tableRiDesc })] })] }), _jsx(CpasTable, { ...this.props, fsTableRef: this, type: "fs", isShowMenuToolBar: this.props.isShowMenuToolBar, isTest: this.props.isTest, formulaTimeSlice: true, gridData: this.props.gridData, ref: this.handsonTableFs, numberZeroReplace: " " })] }));
    }
}
export default HandsonTableFs;
